home *** CD-ROM | disk | FTP | other *** search
Wrap
Colton Software Fireworkz document | 1993-10-24 | 4.4 KB | 94 lines
{Version:1.05;01 Oct 1993;Fireworkz;Gerald Lewis Fitton;6500 1024 5321 6154} {Block:0;0;;32;3;33;;32;3;33} {Style:ZL Base Sheet;{ColWidth:1134}{ColName:x#}{RowHeight:336}{RowHeightFix:1}{RowUnbreakable:0}{RowName:#}{MarginLeft:114}{MarginRight:114}{MarginPara:0}{Tablist}{Background:255;255;255}{ParaStart:32}{ParaEnd:16}{LineSpace:0;72}{Justify:2}{JustifyV:0}{NewObject:1}{Numform:#,##0.00}{NumformDT:dd.mm.yy}{NumformSE:@}{BorderColour:0;0;0}{Border:0}{GridLeftColour:221;221;221}{GridTopColour:221;221;221}{GridRightColour:221;221;221}{GridBottomColour:221;221;221}{GridLeft:0}{GridTop:0}{GridRight:0}{GridBottom:0}{Protect:0}{Typeface:Helvetica}{Fontx:0}{Fonty:240}{Underline:0}{Bold:0}{Italic:0}{Superscript:0}{Subscript:0}{Foreground:0;0;0}} {StyleBase:ZL Base Sheet} {Style:ZL Head Foot;{ColWidth:11164}{MarginLeft:114}{MarginRight:114}{Tablist:C5385 R10771}{ParaStart:68}{ParaEnd:68}{LineSpace:0;72}{Justify:0}} {StyleHeaderFooter:ZL Head Foot} {Style:ZL Current Cell;{BorderColour:0;0;0}{Border:1}} {StyleCurrent:ZL Current Cell} {Style:ZL Text;{RowHeightFix:0}{Justify:0}{NewObject:3}} {StyleText:ZL Text} {Style:ZL Pounds;{Numform:£#,##0.00}} {Style:ZL Percentage;{Numform:0.##%}} {Style:ZL 0dp;{Numform:0}} {Style:ZL 1dp;{Numform:0.0}} {Style:ZL Percent;{Numform:0.##%}} {Style:ZL Protection;{Protect:1}} {Style:ZL GridOff;{GridLeftColour:0;0;0}{GridTopColour:0;0;0}{GridRightColour:0;0;0}{GridBottomColour:0;0;0}{GridLeft:0}{GridTop:0}{GridRight:0}{GridBottom:0}} {Style:ZL GridOn;{GridLeftColour:0;0;0}{GridTopColour:0;0;0}{GridRightColour:0;0;0}{GridBottomColour:0;0;0}{GridLeft:2}{GridTop:2}{GridRight:2}{GridBottom:2}} {Paper:From Printer;0;16839;11907;737;341;341;341;0;0;0;0;32;;1} {PrintQuality:0} {StartOfData} {Name-S:numbertested;a22} {Name-S:last_prime;b9} {Name-S:number_under_test;b10} {Name-S:highest_divisor;b11} {Name-S:array_pointer;b12} {Name-S:prime_at_pointer;b13} {Name-S:remainder;b14} {S:X;X;0;0;Comments and Commands} {S:X;X;0;2;Custom function to find the next prime number} {S:X;X;0;3;given all lower prime numbers} {S:S;F;0;5;;function("nextprime","lowerprimes:array")} {S:X;X;0;7;Declare all local variables as names} {S:S;F;0;8;163;set_name("last_prime",b9)} {S:S;F;0;9;167;set_name("number_under_test",b10)} {S:S;F;0;10;13;set_name("highest_divisor",b11)} {S:S;F;0;11;6;set_name("array_pointer",b12)} {S:S;F;0;12;17;set_name("prime_at_pointer",b13)} {S:S;F;0;13;14;set_name("remainder",b14)} {S:X;X;0;15;Initialise local variables using set_value(name,value)} {S:S;F;0;16;167;set_value(last_prime,max(@lowerprimes))} {S:S;F;0;17;167;set_value(number_under_test,last_prime)} {S:S;F;0;18;13;set_value(highest_divisor,int(sqr(last_prime))+1)} {S:S;F;0;20;;repeat} {S:S;F;0;21;173;set_value(number_under_test,number_under_test+2)} {S:S;F;0;22;0;set_value(array_pointer,0)} {S:S;F;0;24;;repeat} {S:S;F;0;25;6;set_value(array_pointer,array_pointer+1)} {S:S;F;0;26;17;set_value(prime_at_pointer,index(@lowerprimes,1,array_pointer))} {S:S;F;0;27;3;set_value(remainder,mod(number_under_test,prime_at_pointer))} {S:S;F;0;28;;until((remainder=0)|(prime_at_pointer>highest_divisor))} {S:S;F;0;30;;until(prime_at_pointer>highest_divisor)} {S:S;F;0;32;;result(number_under_test)} {S:X;X;1;0;Value} {S:S;C;1;8;167} {S:S;C;1;9;173} {S:S;C;1;10;13} {S:S;C;1;11;6} {S:S;C;1;12;17} {S:S;C;1;13;3} {BR:;;;;;;;;1;1;{StyleHandle:ZL Base Sheet}} {R:5;;;;6;;;;1;0;{ColWidth:1815}} {R:6;;;;7;;;;1;0;{ColWidth:1815}} {R:3;;;;4;;;;1;0;{ColWidth:736}} {R:4;;;;5;;;;1;0;{ColWidth:849}} {R:2;0;;32;3;1;;32;0;0;{ColWidth:1134}} {R:0;0;;32;1;1;;32;0;0;{StyleHandle:ZL Text}} {R:0;2;;32;1;4;;32;0;0;{StyleHandle:ZL Text}} {R:0;5;;32;1;6;;32;0;0;{Justify:0}} {R:0;7;;32;1;8;;32;0;0;{StyleHandle:ZL Text}} {R:0;8;;32;1;14;;32;0;0;{Justify:0}} {R:0;15;;32;1;16;;32;0;0;{StyleHandle:ZL Text}} {R:0;16;;32;1;19;;32;0;0;{Justify:0}} {R:0;20;;32;1;23;;32;0;0;{Justify:0}} {R:0;24;;32;1;29;;32;0;0;{Justify:0}} {R:0;30;;32;1;31;;32;0;0;{Justify:0}} {R:0;32;;32;1;33;;32;0;0;{Justify:0}} {R:1;0;;32;2;1;;32;0;0;{StyleHandle:ZL Text}} {R:0;;;;1;;;;1;0;{ColWidth:7256}} {R:1;;;;2;;;;1;0;{ColWidth:849}} {PageHefoBreakValues-H:0;0;0;;1;397;0;0;;;0;;;1;0;0;0;;;0} {HD-H:0;2} {HBR-H:0;2;;32;;32;{StyleHandle:ZL Base Sheet}} {HBR-H:0;2;;32;;32;{StyleHandle:ZL Head Foot}} {HR-H:0;2;;32;;32;{Justify:0}} {HD-H:0;3} {HBR-H:0;3;;32;;32;{StyleHandle:ZL Base Sheet}} {HBR-H:0;3;;32;;32;{StyleHandle:ZL Head Foot}} {EndOfData} {CmdGroup:{ViewCreate:1008;11936;10976;10816} {ViewControl:100;0;0;0;1;1;0;2048;0;2048} {CurrentPosition:0;0;0;3} }